package com.happy.sky.design.factory;

/**
 * @name: Factory <tb>
 * @title: 工厂类  <tb>
 * @author: cuixinfu@51play.com <tb>
 * @date: 2021/4/25 11:44 <tb>
 */
public class Factory {
    public static Car getCarInstance(String type) {
        Car c = null;
        if ("Benz".equals(type)) {
            c = new Benz();
        }
        if ("Ford".equals(type)) {
            c = new Ford();
        }
        return c;
    }
}